

/**
 * 〈一句话功能简述〉<br>
 * 〈〉
 *
 * @author shilinghuai
 * @create 2022/4/5
 * @since 1.0.0
 */
public class Single {
    public static class MySingle{
        private static MySingle mySingle;
        private MySingle(){}
        public MySingle getMySingle(){
            if(mySingle==null){
                mySingle = new MySingle();
            }
            return mySingle;
        }
    }
    public static class DCL{
        private static volatile DCL dcl;
        private DCL(){}
        public DCL getDcl(){
            if(dcl==null){
                synchronized (DCL.class){
                    if(dcl==null){
                        dcl = new DCL();
                    }
                }
            }
            return dcl;
        }
    }
}
